<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 空白页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
<link rel="shortcut icon" href="favicon.ico">
    <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <link href="__STATIC__/layout/css/plugins/summernote/summernote.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/summernote/summernote-bs3.css" rel="stylesheet">
     <link rel="stylesheet" type="text/css" href="__STATIC__/layout/css/plugins/webuploader/webuploader.css">
    <link rel="stylesheet" type="text/css" href="__STATIC__/layout/css/demo/webuploader-demo.css">
    <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <style>
       .radio-inline input[type=radio] {
            margin-top: 4px
        }
        .note-editable{height: 150px}
    </style>
</head>

<body style="color:#333;padding:3px;">
    <div>
  <form method="post" action="{:url('chaxunlist')}" id="f1" class="form-inline" style="margin:10px">
    <table class="table-bordered table">
        <tr class="title_color">
            <td colspan="6">
              添加核查明细
            </td>
        </tr>
        <tr >
            <td>
                分区<span style="color:red">(*)</span>
            </td>
            <td>
                <select class="form-control" name="fenqu" id="fenqu">
                  <option value="0">请选择</option>
                  {volist name="fenqu" id="f"}
                  <option value="{$f.id}">{$f.title}</option>
                  {/volist}
                </select>
            </td>
            <td>
                省
            </td>
             <td>
                <select class="form-control" name="sheng" id="sheng">
                  <option value="0">请选择</option>
                </select>
            </td>
             <td>
                市
            </td>
             <td>
                <select class="form-control" name="shi" id="shi">
                  <option value="0">请选择</option>
                </select>
            </td>
        </tr>
        <tr>
            <td>所属经销商</td>
             <td colspan="5">
                <select class="form-control" name="jxs" id="jxs">
                  <option value="0">请选择</option>
                </select>
            </td>
        </tr>
       <tr>
            <td>所属系统</td>
             <td colspan="5">
                <select class="form-control" name="system" id="system">
                  <option value="0">请选择</option>
                </select>
            </td>
        </tr>
       <tr>
            <td>所属网点</td>
             <td colspan="5">
                <select class="form-control" name="net" id="net">
                  <option value="0">请选择</option>
                </select>
            </td>
        </tr>
      
        <tr >
            <td>
                活动类型
            </td>
            <td>
                <select class="form-control" name="type">
                  <option value="-1">请选择</option>
                  <option value="0">非常规促销</option>
                  <option value="2">常规促销</option>
                  <option value="1">进场费用</option>
                </select>
            </td>
            <td>
               活动起止时间
            </td>
             <td colspan="4">
               <div class="form-group">
            <input type="text" id="start" class="form-control layer-date " style="min-width:100px;width:120px;display: inline-block;" name="start">
           </div>
            <div class="form-group">
                至
            </div>
           <div class="form-group">
            <input type="text" class="form-control layer-date" style="min-width:100px;width:120px;display: inline-block;" id="end" name="end">
           </div>
            </td>
          
        </tr>
        <tr>
          <td class="text-center" colspan="6">
            <input type="submit" class="btn btn-success" value="下发核查任务" />
          </td>
        </tr>
    </table>
</form>
    </div>
    <!-- 全局js -->
    <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
     <script src="__STATIC__/layout/js/plugins/summernote/summernote.min.js"></script>
    <script src="__STATIC__/layout/js/plugins/summernote/summernote-zh-CN.js"></script>
    <!--统计代码，可删除-->
    <script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
      <script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
      <script>
      document.getElementById("f1").onsubmit=function(){
        if($("#fenqu").val()==0){
          alert("分区必须选择");
          return false;
        }
      }
        $("#fenqu").change(function(){
          $("#sheng").html('<option value="0">请选择</option>');
          $("#shi").html('<option value="0">请选择</option>');
          $("#jxs").html('<option value="0">请选择</option>');
          $("#system").html('<option value="0">请选择</option>');
          $("#net").html('<option value="0">请选择</option>');
          $.post("{:url('qiusheng')}",{id:$(this).val()},function(re){
            var data=JSON.parse(re);
            for(var i=0;i<data.length;i++){
              $("#sheng").append("<option value='"+data[i]["id"]+"'>"+data[i]["title"]+"</option>");
            }
          })
        })
         $("#sheng").change(function(){
         
          $("#shi").html('<option value="0">请选择</option>');
          $("#jxs").html('<option value="0">请选择</option>');
          $("#system").html('<option value="0">请选择</option>');
          $("#net").html('<option value="0">请选择</option>');
          $.post("{:url('qiushi')}",{id:$(this).val()},function(re){
            var data=JSON.parse(re);
            for(var i=0;i<data.length;i++){
              $("#shi").append("<option value='"+data[i]["id"]+"'>"+data[i]["title"]+"</option>");
            }
          })
        })
        $("#shi").change(function(){
          $("#jxs").html('<option value="0">请选择</option>');
          $("#system").html('<option value="0">请选择</option>');
          $("#net").html('<option value="0">请选择</option>');
          $.post("{:url('qiujxs')}",{id:$(this).val()},function(re){
            var data=JSON.parse(re);
            for(var i=0;i<data.length;i++){
              $("#jxs").append("<option value='"+data[i]["id"]+"'>"+data[i]["title"]+"</option>");
            }
          })
        })
         $("#jxs").change(function(){
        
          $("#system").html('<option value="0">请选择</option>');
          $("#net").html('<option value="0">请选择</option>');
          $.post("{:url('qiusys')}",{id:$(this).val()},function(re){
            var data=JSON.parse(re);
            for(var i=0;i<data.length;i++){
              $("#system").append("<option value='"+data[i]["id"]+"'>"+data[i]["title"]+"</option>");
            }
          })
        })
        $("#system").change(function(){
        
        
          $("#net").html('<option value="0">请选择</option>');
          $.post("{:url('qiunet')}",{id:$(this).val()},function(re){
            var data=JSON.parse(re);
            for(var i=0;i<data.length;i++){
              $("#net").append("<option value='"+data[i]["id"]+"'>"+data[i]["title"]+"</option>");
            }
          })
        })
      </script>
    <script>
       //日期范围限制
        var start = {
            elem: '#start',
            format: 'YYYY/MM/DD',
          
            max: '2099-06-16 23:59:59', //最大日期
            istime: true,
            istoday: false,
            choose: function (datas) {
                end.min = datas; //开始日选好后，重置结束日的最小日期
                end.start = datas //将结束日的初始值设定为开始日

            }
        };
        var end = {
            elem: '#end',
            format: 'YYYY/MM/DD',
           // min: laydate.now(),
            max: '2099-06-16 23:59:59',
            istime: true,
            istoday: false,
            choose: function (datas) {
                start.max = datas; //结束日选好后，重置开始日的最大日期
              
            }
        };
     
        laydate(start);
        laydate(end);
       

    </script>
</body>

</html>
